<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>销售订单</title>
    <style>
  .ui-button {
  	  display: inline-block;
	  padding: 2px 2px;
	  margin-bottom: 0;
	  font-size: 8px;
	  font-weight: normal;
	  line-height: 1.42857143;
	  text-align: center;
	  white-space: nowrap;
	  vertical-align: middle;
	  -ms-touch-action: manipulation;
      touch-action: manipulation;
	  cursor: pointer;
	  -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
	  background-image: none;
	  border: 1px solid transparent;
	  border-radius: 4px;
  }
  </style>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  $(document).ready(function(){
      $('#tt').tabs({
          onSelect:function(title){
              $('#tt .panel-body').css('width','auto');
          }
      });
      $(".tabs-wrap").css('width','100%');
  })

 </script>
 </head>
 <body style="overflow-x: hidden;">
  <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="tKpOrderController.do?doAddjh" >
					<input id="id" name="id" type="hidden" value="${tKpOrderPage.id }"/>
	  <input id="orderType" name="orderType" type="hidden" value="${orderType}"/>

	  <table cellpadding="0" cellspacing="1" class="formtable">


		  <tr>
			  <td align="right">
				  <label class="Validform_label">
					  计划开始日期:
				  </label>
			  </td>
			  <td class="value">
				  <input id="by1" name="by1" datatype="*" ignore="checked"  type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()"  ignore="ignore" />
				  <span class="Validform_checktip"></span>
				  <label class="Validform_label" style="display: none;">计划开始日期</label>
			  </td>
			  <td align="right">
				  <label class="Validform_label">
					  计划结束日期:
				  </label>
			  </td>
			  <td class="value">
				  <input id="by2" name="by2" datatype="*" ignore="checked"  type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()"  ignore="ignore" />
				  <span class="Validform_checktip"></span>
				  <label class="Validform_label" style="display: none;">计划结束日期</label>
			  </td>
		  </tr>


		<tr>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">订单类型:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
					  <%--<t:dictSelect field="orderType" type="list"   typeGroupCode="order_type"  defaultVal="${tKpOrderPage.orderType}" hasLabel="false"  title="订单类型" ></t:dictSelect>     --%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">订单类型</label>--%>
			<%--</td>--%>
			<td align="right">
				<label class="Validform_label">客户编码:</label>
			</td>
			<td class="value">
				<t:dictSelect  readonly="readonly" extendJson="{datatype:'*'}" field="cusCode"  dictTable="t_kp_cus"   dictField="cus_code" dictText="cus_name" defaultVal="${cusCode}"  title="客户名称"></t:dictSelect>

				<%--<input id="cusCode" name="cusCode" type="text" style="width: 150px" class="searchbox-inputtext"  ignore="ignore"  onclick="popupClick(this,'cus_code,cus_name','cusCode,cusName','pop_kp_cus')"/>			 --%>
				<span class="Validform_checktip"></span>
				<label class="Validform_label" style="display: none;">客户编码</label>
			</td>
				<td align="right">
					<label class="Validform_label">承建单位:</label>
				</td>
				<td class="value">
					<t:dictSelect readonly="readonly" extendJson="{datatype:'*'}"  field="gdCode"  dictTable="t_kp_gongdi"   dictField="gd_code" dictText="gd_name" defaultVal="${gdCode}" title="工地名称"></t:dictSelect>

						<%--<input id="gdCode" name="gdCode" type="text" style="width: 150px" class="searchbox-inputtext"  ignore="ignore"  onclick="popupClick(this,'gd_code,gd_name','gdCode,gdName','pop_kp_gongdi')"/>			 --%>
					<span class="Validform_checktip"></span>
					<label class="Validform_label" style="display: none;">承建单位</label>
				</td>
		</tr>
		<%--<tr>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">客户名称:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="cusName" name="cusName" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">客户名称</label>--%>
			<%--</td>--%>

		<%--</tr>--%>
		<%--<tr>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">工地名称:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="gdName" name="gdName" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">工地名称</label>--%>
			<%--</td>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">司机:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="ysSiji" name="ysSiji" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">司机</label>--%>
			<%--</td>--%>
		<%--</tr>--%>
		<%--<tr>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">车号:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="ysChehao" name="ysChehao" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">车号</label>--%>
			<%--</td>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">联系人:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="ysLianxiren" name="ysLianxiren" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">联系人</label>--%>
			<%--</td>--%>
		<%--</tr>--%>
		<tr>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">总价值:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
		     	 <%--<input id="orAmount" name="orAmount" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />--%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">总价值</label>--%>
			<%--</td>--%>
			<td align="right">
				<label class="Validform_label">备注:</label>
			</td>
			<td class="value">
		     	 <input id="orRemark" name="orRemark" type="text" style="width: 150px" class="inputxt"  ignore="ignore" />
				<span class="Validform_checktip"></span>
				<label class="Validform_label" style="display: none;">备注</label>
			</td>
		</tr>
		<%--<tr>--%>
			<%--<td align="right">--%>
				<%--<label class="Validform_label">订单状态:</label>--%>
			<%--</td>--%>
			<%--<td class="value">--%>
					  <%--<t:dictSelect field="orStatus" type="list"   typeGroupCode="or_status"  defaultVal="${tKpOrderPage.orStatus}" hasLabel="false"  title="订单状态" ></t:dictSelect>     --%>
				<%--<span class="Validform_checktip"></span>--%>
				<%--<label class="Validform_label" style="display: none;">订单状态</label>--%>
			<%--</td>--%>
		<%--</tr>--%>
	
	</table>
			<div style="width: auto;height: 200px;" id="mydiv">
				<%-- 增加一个div，用于调节页面大小，否则默认太小 --%>
				<div style="width:800px;height:1px;"></div>
				<t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
				 <t:tab href="tKpOrderController.do?tKpOrderOnejhfList&id=${tKpOrderPage.id}" icon="icon-search" title="产品" id="tKpOrderOne"></t:tab>
				</t:tabs>
			</div>
			</t:formvalid>
			<!-- 添加 附表明细 模版 -->
	<table style="display:none">
	<tbody id="add_tKpOrderOne_table_template">
		<tr>
			 <td align="center"><div style="width: 25px;" name="xh"></div></td>
			 <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
				  <td align="left">
							<input name="tKpOrderOneList[#index#].docDate" maxlength="32" type="text" class="Wdate" onClick="WdatePicker()"  style="width:120px;" ignore="ignore" />
					  <label class="Validform_label" style="display: none;">订单日期</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].orStatus" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">订单状态</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].orderType" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">订单类型</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cusCode" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">客户编码</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cusName" maxlength="132" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">客户名称</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cusType" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">客户类型</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].gdCode" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">工地编码</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].gdName" maxlength="132" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">工地名称</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cpCode" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">产品编码</label>
				  </td>
				  <td align="left">
					  		<input name="tKpOrderOneList[#index#].cpName" name="tKpOrderOneList[#index#].cpName" type="text" style="width: 150px" class="searchbox-inputtext"  ignore="ignore"  onclick="popupClick(this,'1','1','pop_kp_jiage_one')"/>
					  <label class="Validform_label" style="display: none;">产品名称</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cpGuige" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">规格</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cpJifei" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">单位</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].orQty" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">方量</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].cpJiage" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">单价</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].orTuopan" maxlength="32" type="text" class="inputxt"  style="width:120px;" 		datatype="n" ignore="checked" />
					  <label class="Validform_label" style="display: none;">托盘数</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].orRemark" maxlength="132" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">备注</label>
				  </td>
				  <td align="left">
					  	<input name="tKpOrderOneList[#index#].kpId" maxlength="32" type="text" class="inputxt"  style="width:120px;"  ignore="ignore" />
					  <label class="Validform_label" style="display: none;">订单号</label>
				  </td>
			</tr>
		 </tbody>
		</table>
 </body>
 <script src = "webpage/com/yserp/kpyw/tKpOrder.js"></script>
	